<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('agent.route.prefix'),
    'namespace'  => config('agent.route.namespace'),
    'middleware' => config('agent.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->get('basic', 'BasicController@index');
    $router->post('basic/range', 'BasicController@range');
    $router->post('basic/cash', 'BasicController@cash');
    $router->post('auth/login', 'AuthController@postLogin');
    $router->resource('auth/users', 'AuthUserController');
    $router->resource('config', 'ConfigController');

    $router->resource('shop', 'ShopController');
    $router->resource('order-commission', 'OrderCommissionController');
    $router->resource('cash-order', 'CashOrderController');

});
